﻿@model IEnumerable<SimpleScrum.Areas.Admin.Models.RolesModel>

@{
    ViewBag.Title = "title";
}

<h2>title</h2>
<div class="span4 offset1">
        @using (Html.BeginForm())
        {
            @Html.ValidationSummary(true)
            <fieldset>
                <legend>Customize Define Roles</legend>
                <label for="textRoleName">Role name:</label>
                <input type="text" value="" name="textRoleName" /><br/>
                <input class="btn btn-success" type="submit" value="Create Role" name="buttonCreateRole" />
                <input class="btn btn-danger" type="submit" value="Delete Role" name="buttonDeleteRole" />
            </fieldset>
            <br/>
            <fieldset>
                <legend>Customize Assign Roles</legend>
                <label for="selectUserName">Users:</label>
                <select name="selectUserName">
                    @foreach (var row in Model)
                    {
                        <option>@row.Email</option>
                    }
                </select>
                <label for="selectRoleName">Roles:</label>
                <select name="selectRoleName">
                    @foreach (var r in Roles.GetAllRoles())
                    {
                        <option>@r</option>
                    }
                </select>
                <br/>
                <input class="btn btn-success" type="submit" value="Add User to Role" name="buttonAddUserToRole" />
                <input class="btn btn-danger" type="submit" value="Delete User from Role" name="buttonDeleteUserFromRole" />
            </fieldset>
        }
    </div>